package com.qf.listener;

import org.springframework.amqp.core.Message;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.io.UnsupportedEncodingException;

//@Component
public class Consumer1 {

    @RabbitListener(queues = "spTopicQue1")
    public void consumer1(Message message) throws UnsupportedEncodingException {
        byte[] body = message.getBody();
        String msg = new String(body, "utf-8");
        System.out.println("spTopicQue1: " + msg);
    }
}
